package edu.yctc.kc.entity;

/**
 * 
 * @className AirLine
 * @description 航线
 * @author zyj
 * @date 2019年12月28日
 *
 */
public class AirLine {

    /** 出发地 */
    private String from;
    /** 目的地 */
    private String to;
    /** 航班类型 */
    private String type;

    private double duration;

    public String getFrom() {
        return from;
    }

    public void setFrom(String from) {
        this.from = from;
    }

    public String getTo() {
        return to;
    }

    public void setTo(String to) {
        this.to = to;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public double getDuration() {
        return duration;
    }

    public void setDuration(double duration) {
        this.duration = duration;
    }

    public AirLine() {
        super();
    }

    public AirLine(String from, String to, String type, double duration) {
        super();
        this.from = from;
        this.to = to;
        this.type = type;
        this.duration = duration;
    }

    @Override
    public String toString() {
        return this.from + "飞往" + this.to + "的" + this.type + ", 飞行时长: " + this.duration;
    }

}
